﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class SelectedGameObject : MonoBehaviour
{
    SelectedImage _selectedBtn;
    void Update()
    {

    }
    public void setselected(SelectedImage btn)
    {
        if (_selectedBtn == null)
        {
            _selectedBtn = btn;
            _selectedBtn.SetImgSelect();       
        }
        else if (_selectedBtn != btn)
        {       
            _selectedBtn.ResetImg();
            _selectedBtn = btn;
            _selectedBtn.SetImgSelect();

        }   
    }

}